Optimal. Leaf size=30 \[ \frac {(A+C) \sin (c+d x)}{d}-\frac {C \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {3092}
\begin {gather*} \frac {(A+C) \sin (c+d x)}{d}-\frac {C \sin ^3(c+d x)}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3092
Rubi steps
\begin {align*} \int \cos (c+d x) \left (A+C \cos ^2(c+d x)\right ) \, dx &=-\frac {\text {Subst}\left (\int \left (A+C-C x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac {(A+C) \sin (c+d x)}{d}-\frac {C \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 50, normalized size = 1.67 \begin {gather*} \frac {A \cos (d x) \sin (c)}{d}+\frac {A \cos (c) \sin (d x)}{d}+\frac {C \sin (c+d x)}{d}-\frac {C \sin ^3(c+d x)}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 33, normalized size = 1.10
method | result | size |
derivativedivides | \(\frac {\frac {C \left (\cos ^{2}\left (d x +c \right )+2\right ) \sin \left (d x +c \right )}{3}+A \sin \left (d x +c \right )}{d}\) | \(33\) |
default | \(\frac {\frac {C \left (\cos ^{2}\left (d x +c \right )+2\right ) \sin \left (d x +c \right )}{3}+A \sin \left (d x +c \right )}{d}\) | \(33\) |
risch | \(\frac {\sin \left (d x +c \right ) A}{d}+\frac {3 C \sin \left (d x +c \right )}{4 d}+\frac {\sin \left (3 d x +3 c \right ) C}{12 d}\) | \(40\) |
norman | \(\frac {\frac {2 \left (A +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 \left (A +C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 \left (3 A +C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}\) | \(75\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 34, normalized size = 1.13 \begin {gather*} -\frac {{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C - 3 \, A \sin \left (d x + c\right )}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 28, normalized size = 0.93 \begin {gather*} \frac {{\left (C \cos \left (d x + c\right )^{2} + 3 \, A + 2 \, C\right )} \sin \left (d x + c\right )}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 56 vs.
\(2 (24) = 48\).
time = 0.12, size = 56, normalized size = 1.87 \begin {gather*} \begin {cases} \frac {A \sin {\left (c + d x \right )}}{d} + \frac {2 C \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {C \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (A + C \cos ^{2}{\left (c \right )}\right ) \cos {\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 34, normalized size = 1.13 \begin {gather*} -\frac {{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C - 3 \, A \sin \left (d x + c\right )}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 28, normalized size = 0.93 \begin {gather*} -\frac {\frac {C\,{\sin \left (c+d\,x\right )}^3}{3}-\sin \left (c+d\,x\right )\,\left (A+C\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________